package com.elm.serviceimpl;

import java.util.List;

import com.elm.dao.ShoppingCarDao;
import com.elm.daoimpl.ShoppingCarDaoImpl;
import com.elm.model.ShoppingCar;
import com.elm.service.ShoppingCarService;
/**

 *  

 * @author pgm

 *

 */
public class ShoppingCarServiceImpl implements ShoppingCarService{
	ShoppingCarDao cdao = new ShoppingCarDaoImpl();
	@Override
	public List<ShoppingCar> getAllFoodIdByUserid(int userid) {
		
		return cdao.getAllFoodIdByUserid(userid);
	}
	@Override
	public int emptyShoppingCar(int userid) {
		int i = cdao.emptyShoppingCar(userid);
		return i;
	}
	@Override
	public List<Integer> getShoppingCarFoodidsByCarids(List<Integer> ordercarids) {
		// TODO Auto-generated method stub
		return cdao.getShoppingCarFoodidsByCarids(ordercarids);
	}
	@Override
	public List<Integer> getShoppingCarnumfoodByCarids(List<Integer> ordercarids) {
		// TODO Auto-generated method stub
		return cdao.getShoppingCarnumfoodByCarids(ordercarids);
	}
	@Override
	public boolean addToShoppingCar(int userid, int foodid) {
		// TODO Auto-generated method stub
		return cdao.addToShoppingCar(userid, foodid);
	}
	@Override
	public void changeNumFoods(String[] fnumbers, List<ShoppingCar> cars) {
		// TODO Auto-generated method stub
		cdao.changeNumFoods(fnumbers, cars);
	}
	@Override
	public int deleteCarInfo(int carid) {
		return cdao.deleteCarInfo(carid);
	}
}
